<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>记事本-VUE</title>
		<script src="../../assets/js/base/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<div>
				<input v-model="inputValue" type="text" v-on:keyup.enter="add">
				<button type="button" @click="add()">添加</button>
				<input type="text" @keyup.enter="search" v-model="keyworlds"/>
				<button type="button" @click="search">搜索</button>
			</div>
			<div> 
				<ul>
					<li v-on:click="complete(index)" 
						v-for="item,index in search()" 
						:key="index">
						<p>
							<span>{{index+1}}:{{item}}</span>
							<button type="button"@click.stop="complete(index)">删除</button>
						</p>
					</li>
				</ul>
			</div>
			<div>
				<span v-show="list.length != 0">共：{{list.length}}个代办事项</span>
				<button v-if="list.length != 0" v-on:click="clear">清空</button>
			</div>
		</div>
		<script src="../../assets/js/notepad/notepad.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
